package com.azdebugit.moshi.test.learn.zhuangshimoshi.test.abs;

import com.azdebugit.moshi.test.learn.zhuangshimoshi.test.Video;

/**
 * 具体的修饰类
 * @author zouxq
 */
public class AdvertisingVideoDecorator extends BaseVideoDecorator {
 
    // 定义被修饰者
    public AdvertisingVideoDecorator(Video video) {
        super(video);
    }
 
    @Override
    public void play() {
        addAdvertising();
        super.play();
    }
 
    // 定义修饰的方法
    private void addAdvertising(){
        System.out.println("来看个广告，充钱可以不用看哦");
    }
 
}